<?php
    class BoxLogin extends CPortlet
    {
        protected function renderContent()  
        {
            if(isset($_SESSION['userId'])){
                $day = date("d",time());
                $month = date("m",time());
                $year = date("Y",time());
                $userId = $_SESSION['userId'];
                $revenue_day = Revenue::getRevenueStatisticHomeByDay($userId,$day,$month,$year) ;
                $revenue_month = Revenue::getRevenueStatisticHomeByMonth($userId,$month,$year);
                //var_dump($revenue_day,$revenue_month) ;
                $this->render("box_login",array("revenue_day"=>$revenue_day,"revenue_month"=>$revenue_month));
            }
        }
    }
?>